package com.cn.jx.manager.po;

import static com.jx.util.CodeUtil.getRandomId;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.jx.base.BaseEntity;
import com.jx.enumType.YesNoEnum;

/**
 * <p>Job 岗位POJO类 对应数据库表名 SYS_JOB
 * <p>实现<{@link Serializable <tt>序列化接口</tt>}
 * <p>实现<{@link BaseEntity <tt>BaseEntity</tt>}
 *  
 * @author <h1>jiangxu2  2019年11月21日</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * 
 */
@Entity
@Table(name="SYS_JOB")
public class Job extends BaseEntity {

	private static final long serialVersionUID = -5287303137498839759L;

	/** <p>岗位名称<p>设置为{@link String String}类型*/
	@Column(name="job_name",length=64)
	private String jobName;
	
	/** <p>岗位编码<p>设置为{@link String String}类型*/
	@Column(name="job_code",length=64,unique=true,nullable=false)
	private String jobCode;
	
	/** <p>职位描述<p>设置为{@link String String}类型*/
	@Column(name="job_describe",length=200)
	private String jobDescribe;
	
	/** <p>排序<p>设置为{@link String String}类型*/
	@Column(name="sort")
	private Integer sort;
	
	/**
	 * 初始化创建类
	 * @return
	 */
	public static Job getInstance(String operUser){
		Date day=new Date();
		Job m=new Job();
		m.setId(getRandomId());
		m.setDelFlg(YesNoEnum.NO.getCode());
		m.setValidFlg(YesNoEnum.YES.getCode());
		m.setCreateTime(day);
		m.setOperatTime(day);
		m.setOperatUser(operUser);
		m.setCreateUser(operUser);
		return m;
	}

	/** <p>{@link Integer Integer}<p>getSort()*/
	public Integer getSort() {
		return sort;
	}
	/** <p>{@link String String}<p>getJobDescribe()*/
	public String getJobDescribe() {
		return jobDescribe;
	}
	/** <p>{@link String String}<p>getJobName()*/
	public String getJobName() {
		return jobName;
	}
	/** <p>{@link String String}<p>getJobCode()*/
	public String getJobCode() {
		return jobCode;
	}
	
	/** <p>setSort({@link Integer sort})*/
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	/** <p>setJobDescribe({@link String jobDescribe})*/
	public void setJobDescribe(String jobDescribe) {
		this.jobDescribe = jobDescribe;
	}
	/** <p>setJobName({@link String jobName})*/
	public void setJobName(String jobName) {
		this.jobName = jobName;
	}
	/** <p>setJobCode({@link String jobCode})*/
	public void setJobCode(String jobCode) {
		this.jobCode = jobCode;
	}
}
